﻿Imports System.Text

Public Class freplace

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Button1.Enabled = False

        Dim sb As New StringBuilder()

        Dim orgstr As String = txtorg.Text

        Dim strar() As String = orgstr.Split(New Char() {"\n"}, StringSplitOptions.RemoveEmptyEntries)

        Dim rule As String = txtrule.Text


        Dim i As Integer = 0
        For Each str As String In strar
            Dim t As String = ""
            rule = rule.Replace("{" & i & "}", str)

            sb.Append(rule)
            i = i + 1
        Next



        MessageBox.Show("done")
        Button1.Enabled = True
    End Sub
End Class